package cn.stylefeng.guns.modular.basic.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.basic.entity.BasicWarehouse;
import cn.stylefeng.guns.modular.basic.model.params.BasicWarehouseParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicWarehouseResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 仓库表
 */
public interface BasicWarehouseService extends IService<BasicWarehouse> {

    /**
     * 新增
     */
    void add(BasicWarehouseParam param);

    /**
     * 删除
     */
    void delete(BasicWarehouseParam param);

    /**
     * 更新
     */
    void update(BasicWarehouseParam param);

    /**
     * 查询单条数据，Specification模式
     */
    BasicWarehouseResult findBySpec(BasicWarehouseParam param,Long deptId,Long operateId);

    /**
     * 查询列表，Specification模式
     */
    List<BasicWarehouseResult> findListBySpec(BasicWarehouseParam param,Long deptId,Long operateId);

    /**
     * 查询分页数据，Specification模式
     */
     LayuiPageInfo findPageBySpec(BasicWarehouseParam param,String condition,Long deptId,Long operateId);

	List<BasicWarehouse> listByDeptId(Long deptId);

	/**
	 * 查询可选择的仓库
	 * @param deptId
	 * @param deliverId
	 * @return
	 */
	List<BasicWarehouseResult> findAvailableList(Long deptId, Long deliverId, Long operateId);

	List<BasicWarehouseResult> findStoragelistPageBySpec(BasicWarehouseParam basicWarehouseParam, String condition, Long deptId);

    List<Map<String,String>> getRecommendWarehouselist(Long warehouseId, String goodsNumber);

    LayuiPageInfo getWarehouseByStoreId(String storeId, Long deptId, Long operateId);


}
